/*event,isPC,fullAnimatbanner,scrollStyleV,imglist5,mAlert,imgGeomeScale,mobileBanner,marqueeEffect,hBannerLoop,fadeBanner*/
jQuery.easing.jswing = jQuery.easing.swing;
jQuery.extend(jQuery.easing, {
	def: "easeOutQuad",
	swing: function(e, f, a, h, g) {
		return jQuery.easing[jQuery.easing.def](e, f, a, h, g)
	},
	easeInQuad: function(e, f, a, h, g) {
		return h * (f /= g) * f + a
	},
	easeOutQuad: function(e, f, a, h, g) {
		return -h * (f /= g) * (f - 2) + a
	},
	easeInOutQuad: function(e, f, a, h, g) {
		if ((f /= g / 2) < 1) {
			return h / 2 * f * f + a
		}
		return -h / 2 * (--f * (f - 2) - 1) + a
	},
	easeInCubic: function(e, f, a, h, g) {
		return h * (f /= g) * f * f + a
	},
	easeOutCubic: function(e, f, a, h, g) {
		return h * ((f = f / g - 1) * f * f + 1) + a
	},
	easeInOutCubic: function(e, f, a, h, g) {
		if ((f /= g / 2) < 1) {
			return h / 2 * f * f * f + a
		}
		return h / 2 * ((f -= 2) * f * f + 2) + a
	},
	easeInQuart: function(e, f, a, h, g) {
		return h * (f /= g) * f * f * f + a
	},
	easeOutQuart: function(e, f, a, h, g) {
		return -h * ((f = f / g - 1) * f * f * f - 1) + a
	},
	easeInOutQuart: function(e, f, a, h, g) {
		if ((f /= g / 2) < 1) {
			return h / 2 * f * f * f * f + a
		}
		return -h / 2 * ((f -= 2) * f * f * f - 2) + a
	},
	easeInQuint: function(e, f, a, h, g) {
		return h * (f /= g) * f * f * f * f + a
	},
	easeOutQuint: function(e, f, a, h, g) {
		return h * ((f = f / g - 1) * f * f * f * f + 1) + a
	},
	easeInOutQuint: function(e, f, a, h, g) {
		if ((f /= g / 2) < 1) {
			return h / 2 * f * f * f * f * f + a
		}
		return h / 2 * ((f -= 2) * f * f * f * f + 2) + a
	},
	easeInSine: function(e, f, a, h, g) {
		return -h * Math.cos(f / g * (Math.PI / 2)) + h + a
	},
	easeOutSine: function(e, f, a, h, g) {
		return h * Math.sin(f / g * (Math.PI / 2)) + a
	},
	easeInOutSine: function(e, f, a, h, g) {
		return -h / 2 * (Math.cos(Math.PI * f / g) - 1) + a
	},
	easeInExpo: function(e, f, a, h, g) {
		return f == 0 ? a : h * Math.pow(2, 10 * (f / g - 1)) + a
	},
	easeOutExpo: function(e, f, a, h, g) {
		return f == g ? a + h : h * (-Math.pow(2, -10 * f / g) + 1) + a
	},
	easeInOutExpo: function(e, f, a, h, g) {
		if (f == 0) {
			return a
		}
		if (f == g) {
			return a + h
		}
		if ((f /= g / 2) < 1) {
			return h / 2 * Math.pow(2, 10 * (f - 1)) + a
		}
		return h / 2 * (-Math.pow(2, -10 * --f) + 2) + a
	},
	easeInCirc: function(e, f, a, h, g) {
		return -h * (Math.sqrt(1 - (f /= g) * f) - 1) + a
	},
	easeOutCirc: function(e, f, a, h, g) {
		return h * Math.sqrt(1 - (f = f / g - 1) * f) + a
	},
	easeInOutCirc: function(e, f, a, h, g) {
		if ((f /= g / 2) < 1) {
			return -h / 2 * (Math.sqrt(1 - f * f) - 1) + a
		}
		return h / 2 * (Math.sqrt(1 - (f -= 2) * f) + 1) + a
	},
	easeInElastic: function(f, h, e, l, k) {
		var i = 1.70158;
		var j = 0;
		var g = l;
		if (h == 0) {
			return e
		}
		if ((h /= k) == 1) {
			return e + l
		}
		if (!j) {
			j = k * .3
		}
		if (g < Math.abs(l)) {
			g = l;
			var i = j / 4
		} else {
			var i = j / (2 * Math.PI) * Math.asin(l / g)
		}
		return -(g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * 2 * Math.PI / j)) + e
	},
	easeOutElastic: function(f, h, e, l, k) {
		var i = 1.70158;
		var j = 0;
		var g = l;
		if (h == 0) {
			return e
		}
		if ((h /= k) == 1) {
			return e + l
		}
		if (!j) {
			j = k * .3
		}
		if (g < Math.abs(l)) {
			g = l;
			var i = j / 4
		} else {
			var i = j / (2 * Math.PI) * Math.asin(l / g)
		}
		return g * Math.pow(2, -10 * h) * Math.sin((h * k - i) * 2 * Math.PI / j) + l + e
	},
	easeInOutElastic: function(f, h, e, l, k) {
		var i = 1.70158;
		var j = 0;
		var g = l;
		if (h == 0) {
			return e
		}
		if ((h /= k / 2) == 2) {
			return e + l
		}
		if (!j) {
			j = k * .3 * 1.5
		}
		if (g < Math.abs(l)) {
			g = l;
			var i = j / 4
		} else {
			var i = j / (2 * Math.PI) * Math.asin(l / g)
		}
		if (h < 1) {
			return -.5 * g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * 2 * Math.PI / j) + e
		}
		return g * Math.pow(2, -10 * (h -= 1)) * Math.sin((h * k - i) * 2 * Math.PI / j) * .5 + l + e
	},
	easeInBack: function(e, f, a, i, h, g) {
		if (g == undefined) {
			g = 1.70158
		}
		return i * (f /= h) * f * ((g + 1) * f - g) + a
	},
	easeOutBack: function(e, f, a, i, h, g) {
		if (g == undefined) {
			g = 1.70158
		}
		return i * ((f = f / h - 1) * f * ((g + 1) * f + g) + 1) + a
	},
	easeInOutBack: function(e, f, a, i, h, g) {
		if (g == undefined) {
			g = 1.70158
		}
		if ((f /= h / 2) < 1) {
			return i / 2 * f * f * (((g *= 1.525) + 1) * f - g) + a
		}
		return i / 2 * ((f -= 2) * f * (((g *= 1.525) + 1) * f + g) + 2) + a
	},
	easeInBounce: function(e, f, a, h, g) {
		return h - jQuery.easing.easeOutBounce(e, g - f, 0, h, g) + a
	},
	easeOutBounce: function(e, f, a, h, g) {
		if ((f /= g) < 1 / 2.75) {
			return h * 7.5625 * f * f + a
		} else {
			if (f < 2 / 2.75) {
				return h * (7.5625 * (f -= 1.5 / 2.75) * f + .75) + a
			} else {
				if (f < 2.5 / 2.75) {
					return h * (7.5625 * (f -= 2.25 / 2.75) * f + .9375) + a
				} else {
					return h * (7.5625 * (f -= 2.625 / 2.75) * f + .984375) + a
				}
			}
		}
	},
	easeInOutBounce: function(e, f, a, h, g) {
		if (f < g / 2) {
			return jQuery.easing.easeInBounce(e, f * 2, 0, h, g) * .5 + a
		}
		return jQuery.easing.easeOutBounce(e, f * 2 - g, 0, h, g) * .5 + h * .5 + a
	}
});
var Yeffect = {
	event: {
		start: function(dom, fn) {
			dom = $(dom).eq(0);
			if (!this.move.touchs) {
				this.move.touchs = {}
			};
			if (!this.start.ISpc) {
				this.start.ISpc = Yeffect.isPC()
			};
			var thiso = this;
			if (this.start.ISpc) {
				thiso.move.touchs = null;
				dom.mousedown(function(e) {
					thiso.move.touchs = e;
					fn.call(this, e)
				})
			} else {
				dom[0].addEventListener("touchstart", function(e) {
					var touchs = e.touches;
					var thiskey = Object.keys(touchs);
					var minlen = thiskey.length - 2;
					minlen = Math.max(minlen, 0);
					var thistouch = touchs[thiskey[minlen]];
					for (var o in touchs) {
						if (!thiso.move.touchs[thistouch.identifier]) {
							var datsA = {};
							var datsM = {};
							for (var p in thistouch) {
								datsA[p] = thistouch[p];
								datsM[p] = thistouch[p];
							};
							var newdtas = {
								dataS: datsA,
								dataM: datsM
							};
							thiso.move.touchs[thistouch.identifier] = JSON.parse(JSON.stringify(
								newdtas))
						}
					};
					thistouch.preventDefault = function() {
						e.preventDefault()
					};
					fn.bind(this)(thistouch, touchs)
				})
			}
		},
		move: function(dom, fn) {
			if (!this.move.touchs) {
				this.start(dom, function() {})
			};
			dom = $(dom).eq(0);
			var thiso = this;
			if (this.start.ISpc) {
				dom.mousemove(function(e) {
					if (thiso.move.touchs) {
						e.mousedown = true;
						e.deltaX = e.pageX - thiso.move.touchs.pageX;
						e.deltaY = e.pageY - thiso.move.touchs.pageY;
					} else {
						e.deltaX = 0;
						e.deltaY = 0;
						e.mousedown = false;
					};
					fn.call(this, e)
				})
			} else {
				dom[0].addEventListener("touchmove", function(e) {
					var touchs = e.touches;
					for (var o in touchs) {
						var idter = touchs[o].identifier;
						if (idter != undefined) {
							if (touchs[o].pageX != thiso.move.touchs[idter].dataM.pageX || touchs[o]
								.pageY != thiso.move.touchs[idter].dataM.pageY) {
								thiso.move.touchs[idter].dataM.pageX = touchs[o].pageX;
								thiso.move.touchs[idter].dataM.pageY = touchs[o].pageY;
								var thistouch = touchs[o];
								thistouch.preventDefault = function() {
									e.preventDefault()
								};
								thistouch.deltaX = thiso.move.touchs[idter].dataM.pageX - thiso.move
									.touchs[idter].dataS.pageX;
								thistouch.deltaY = thiso.move.touchs[idter].dataM.pageY - thiso.move
									.touchs[idter].dataS.pageY;
								thiso.move.touchs[idter].deltaX = thistouch.deltaX;
								thiso.move.touchs[idter].deltaY = thistouch.deltaY;
								fn.bind(this)(thistouch, touchs)
							}
						};
					}
				})
			}
		},
		end: function(dom, fn) {
			if (!this.move.touchs) {
				this.start(dom, function() {})
			};
			dom = $(dom).eq(0);
			var thiso = this;
			if (this.start.ISpc) {
				dom.mouseup(function(e) {
					if (thiso.move.touchs) {
						e.deltaX = e.pageX - thiso.move.touchs.pageX;
						e.deltaY = e.pageY - thiso.move.touchs.pageY;
					} else {
						e.deltaX = 0;
						e.deltaY = 0;
					};
					e.mousedown = false;
					thiso.move.touchs = null;
					fn.call(dom[0], e)
				})
			} else {
				dom[0].addEventListener("touchend", function(e) {
					var touchs = e.touches;
					var curkey = [];
					for (var o in touchs) {
						if (touchs[o].identifier != undefined) {
							curkey.push(touchs[o].identifier + "")
						}
					};
					for (var t in thiso.move.touchs) {
						if (curkey.indexOf(t) < 0) {
							var touchtT = thiso.move.touchs[t];
							if (!touchtT.deltaY && touchtT.deltaY != 0) {
								touchtT.deltaX = 0;
								touchtT.deltaY = 0;
							};
							fn.bind(this)(touchtT);
							delete thiso.move.touchs[t];
						}
					};
				})
			}
		}
	},
	isPC: function() {
		var userAgentInfo = navigator.userAgent;
		var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
		var flag = true;
		for (var v = 0; v < Agents.length; v++) {
			if (userAgentInfo.indexOf(Agents[v]) > -1) {
				flag = false;
				break
			}
		}
		return flag
	},
	fullAnimatbanner: function(obj1, obj2, num, btnL, btnR, css, time, aniTimer, ismouseover, easingstr) {
		num = num || "";
		btnL = btnL || "";
		btnR = btnR || "";
		css = css || "current";
		time = time || 5e3;
		aniTimer = aniTimer || 300;
		easingstr = easingstr || "linear";
		ismouseover = ismouseover || false;
		var obj1Obj = $(obj1);
		var obj2Obj = $(obj2);
		var numObj = $(num);
		var btnLObj = $(btnL);
		var btnRObj = $(btnR);
		obj1Obj.css("width", "100%");
		obj2Obj.css({
			position: "absolute",
			top: 0,
			left: "100%",
			width: "100%"
		});
		var liliength = obj2Obj.length;
		var curptins = 0;
		var setIntervalsAAA;
		obj2Obj.eq(curptins).css({
			left: 0
		});
		numObj.removeClass(css).eq(curptins).addClass(css);
		obj2Obj.removeClass(css).eq(curptins).addClass(css);
		numObj.click(function() {
			var curindex = numObj.index(this);
			if (curindex != curptins) {
				animatgundxz(curindex, true)
			}
		});
		btnLObj.click(function() {
			if (liliength > 1) {
				if (curptins - 1 < 0) {
					animatgundxz(liliength - 1, false)
				} else {
					animatgundxz(curptins - 1, false)
				}
			}

		});
		btnRObj.click(function() {
			if (liliength > 1) {
				if (curptins + 1 > liliength - 1) {
					animatgundxz(0, true)
				} else {
					animatgundxz(curptins + 1, true)
				}
			}

		});
		//setIntervalsAAA = setInterval(functionTimegd, time);

		function functionTimegd() {
			if (curptins + 1 > liliength - 1) {
				animatgundxz(0, true)
			} else {
				animatgundxz(curptins + 1, true)
			}
		};

		function animatgundxz(cuet, drect) {
			//clearInterval(setIntervalsAAA);
			//setIntervalsAAA = setInterval(functionTimegd, time);
			obj2Obj.stop().css({
				left: "100%"
			});
			if (drect) {
				obj2Obj.eq(cuet).stop().css({
					left: "100%"
				});
				obj2Obj.eq(cuet).animate({
					left: 0
				}, aniTimer, easingstr);
				obj2Obj.eq(curptins).stop().css({
					left: "0%"
				});
				obj2Obj.eq(curptins).animate({
					left: "-100%"
				}, aniTimer, easingstr)
			} else {
				obj2Obj.eq(cuet).css({
					left: "-100%"
				}).animate({
					left: 0
				}, aniTimer, easingstr);
				obj2Obj.eq(curptins).css({
					left: "0%"
				}).animate({
					left: "100%"
				}, aniTimer, easingstr)
			};
			curptins = cuet;
			numObj.removeClass(css).eq(curptins).addClass(css);
			obj2Obj.removeClass(css).eq(curptins).addClass(css)
		};
		if (ismouseover) {
			obj1Obj.hover(function() {
				//clearInterval(setIntervalsAAA)
			}, function() {
				//setIntervalsAAA = setInterval(functionTimegd, time)
			})
		};
		$(window).resize(function() {
			obj2Obj.stop().css({
				left: "100%"
			});
			obj2Obj.eq(curptins).stop().css({
				left: 0
			})
		})
	},
	scrollStyleV: function(Diva, divb, tiaoa, tiaob) {
		// var isPcsd = this.isPC();
		// if (!isPcsd) return;
		tiaoa = tiaoa || "";
		tiaob = tiaob || "";
		var DivA_obj = $(Diva);
		var divb_obj = $(divb);
		var tiaoA_obj = $(tiaoa);
		var tiaob_obj = $(tiaob);
		//console.log(divb_obj)
		var bilizhi;
		var bilizhis2;
		divb_obj.find("img").load(sethanshu);
		sethanshu();

		function sethanshu() {
			var DivA_objH = DivA_obj.height();
			var divb_objH = divb_obj.height();
			bilizhi = DivA_objH / divb_objH;
			if (bilizhi >= 1) {
				tiaoA_obj.hide()
			} else {
				//console.log(DivA_obj.scrollTop())
				tiaoA_obj.show();
				tiaob_obj.height(bilizhi * 100 + "%").css("top", DivA_obj.scrollTop() * bilizhi);
			}
		};
		$(window).resize(sethanshu);
		DivA_obj.scroll(sethanshu);
		tiaob_obj.mousedown(function(e) {
			var yuanshiutp = e.pageY;
			var scscctop = DivA_obj.scrollTop();
			bilizhis2 = tiaob_obj.height() / DivA_obj.height();
			$(document).unbind("mousemove");
			$(document).mousemove(function(u) {
				DivA_obj.scrollTop(scscctop + (u.pageY - yuanshiutp) / bilizhis2);
				return false
			});
			return false
		});
		$(document).mouseup(function() {
			$(document).unbind("mousemove")
		})
	},
	imglist5: function(ul, btnL, btnR, tagname, posArry, deft, textcon, tag, timenum, easingstr) {
		easingstr = easingstr || "linear";
		timenum = timenum || 300;
		var btnLo = $(btnL);
		var btnRo = $(btnR);
		var ulo = $(ul);
		var lio = ulo.find(tagname);
		var poinshu = [];
		deft = deft || 0;
		deft = deft + 1;
		textcon = textcon || "";
		tag = tag || "";
		var deftint = deft - 1;
		var curInt = deft - 1;
		var curdanw = 0;
		textcon = textcon || "";
		tag = tag || "";
		var textcono = $(textcon);
		lio.each(function(index) {
			poinshu.push(index + deftint);
			if (index + deftint > 4) {
				$(this).css({
					marginLeft: posArry[4].x + 150,
					marginTop: posArry[4].y,
					width: posArry[4].w,
					height: posArry[4].h,
					zIndex: 1
				})
			} else {
				$(this).css({
					marginLeft: posArry[index + deftint].x,
					marginTop: posArry[index + deftint].y,
					width: posArry[index + deftint].w,
					height: posArry[index + deftint].h,
					zIndex: posArry[index + deftint].z
				})
			}
		});
		textcono.text(lio.eq(3 - deft).find(tag).text());
		btnLo.click(function() {
			if (curInt < 2) {
				curInt++;
				curdanw = 1;
				setGUND()
			}
		});
		btnRo.click(function() {
			if (poinshu[poinshu.length - 1] > 2) {
				curInt--;
				curdanw = -1;
				setGUND()
			}
		});

		function setGUND() {
			for (var i = 0; i < poinshu.length; i++) {
				poinshu[i] += curdanw;
				var curzhi = poinshu[i];
				if (!(curzhi < 0 || curzhi > 4)) {
					lio.eq(i).css({
						zIndex: posArry[curzhi].z
					}).animate({
						marginLeft: posArry[curzhi].x,
						marginTop: posArry[curzhi].y,
						width: posArry[curzhi].w,
						height: posArry[curzhi].h
					}, timenum, easingstr);
					if (curzhi == 2) {
						textcono.text(lio.eq(i).find(tag).text())
					}
				};
				if (curzhi < 0) {
					lio.eq(i).css({
						zIndex: 1
					}).animate({
						marginLeft: posArry[0].x - 150,
						marginTop: posArry[0].y,
						width: posArry[0].w,
						height: posArry[0].h
					}, timenum, easingstr)
				};
				if (curzhi > 4) {
					lio.eq(i).css({
						zIndex: 1
					}).animate({
						marginLeft: posArry[4].x + 228,
						marginTop: posArry[4].y,
						width: posArry[4].w,
						height: posArry[4].h
					}, timenum, easingstr)
				}
			};
		}
	},
	mAlert: function(text, time, isscroll) {
		var htmls = $("html");
		var mAlertClass = $(".mAlertClass");
		if (mAlertClass.length > 0) mAlertClass.remove();
		time = time || 3e3;
		isscroll = isscroll || false;
		var divalert = $(
			"<div class='mAlertClass' style='position:fixed; width:100%; height:100%; z-index:10000; left:0px; top:0px;'><div style='font-size:13px; color:#fff; background:rgba(0,0,0,0.6); line-height:20px;  text-align:center; overflow:hidden; left:50%; top:50%; padding:10px; margin-top:-20px; position:absolute; border-radius:5px; transform: translateX(-50%); -webkit-transform: translateX(-50%);'>" +
			text + "</div></div>");
		$("body").append(divalert);

		function removets() {
			divalert.remove();
			htmls.css({
				borderRight: 0,
				overflowY: "visible"
			})
		};
		if (!isscroll) {
			if (window["addEventListener"]) {
				divalert[0].addEventListener("touchstart", function(e) {
					e.preventDefault()
				})
			};
			var divapen = $("<div></div>");
			var divapenn = $("<div></div>");
			divapen.css({
				clear: "both",
				width: 100,
				height: 100,
				overflowY: "scroll",
				position: "absolute",
				top: 0,
				left: 0
			});
			divapen.append(divapenn);
			$("body").append(divapen);
			htmls.css({
				overflow: "hidden",
				borderRight: divapen.width() - divapenn.width() + "px solid #eee"
			});
			divapen.remove()
		};
		setTimeout(removets, time);
		return removets
	},
	imgGeomeScale: function(obj, nocent) {
		var bder = nocent || false;
		$(obj).each(function(i) {
			var img = $(this);
			if (img.attr("data-set")) {
				return
			};
			img.attr("data-style", "yes");
			var realWidth;
			var realHeight;
			var objwidh = img.width();
			var objhet = img.height();
			$("<img/>").attr("src", img.attr("src")).load(function() {
				realWidth = this.width;
				realHeight = this.height;
				if (objwidh / objhet > realWidth / realHeight) {
					var widthhou = objhet * realWidth / realHeight;
					img.width(widthhou);
					if (!bder) {
						img.css({
							paddingLeft: (objwidh - widthhou) / 2,
							paddingRight: (objwidh - widthhou) / 2
						})
					}
				} else {
					var heithou = objwidh * realHeight / realWidth;
					img.height(heithou);
					if (!bder) {
						img.css({
							paddingTop: (objhet - heithou) / 2,
							paddingBottom: (objhet - heithou) / 2
						})
					}
				};
			})
		})
	},
	mobileBanner: function(obj1, obj2, num, btnL, btnR, css, time, aniTimer, easingstr) {
		num = num || "";
		btnL = btnL || "";
		btnR = btnR || "";
		css = css || "current";
		time = time || 5e3;
		aniTimer = aniTimer || 300;
		easingstr = easingstr || "linear";
		var obj1ul = $(obj1);
		var obj2li = $(obj2);
		var numdian = $(num);
		if (obj1ul.length < 1) return;
		if (obj2li.length < 2) return;
		var domObj = obj1ul.eq(0);
		obj1ul.css("width", "100%");
		obj2li.css({
			position: "absolute",
			top: 0,
			left: "100%",
			width: "100%"
		});
		var ulweidth = obj1ul.width();
		var liliength = obj2li.length;
		var curptins = 0;
		var setIntervalsAAA;
		var panstPotinX = 0;
		var starTime = 0;
		var isDragendeanli = true;
		obj2li.eq(curptins).css({
			left: 0
		});
		numdian.removeClass(css).eq(curptins).addClass(css);
		obj2li.removeClass(css).eq(curptins).addClass(css);
		numdian.click(function() {
			var curindex = numdian.index(this);
			if (curindex != curptins) {
				animatgundxz(curindex, true)
			}
		});
		$(btnL).click(function() {
			if (curptins - 1 < 0) {
				animatgundxz(liliength - 1, false)
			} else {
				animatgundxz(curptins - 1, false)
			}
		});
		$(btnR).click(function() {
			if (curptins + 1 > liliength - 1) {
				animatgundxz(0, true)
			} else {
				animatgundxz(curptins + 1, true)
			}
		});
		this.event.start(domObj, function(ev) {
			if (!isDragendeanli) return;
			panstPotinX = 0;
			starTime = new Date().getTime()
		});

		function animateEndfunction() {
			isDragendeanli = true
		};
		this.event.end(domObj, function(ev) {
			if (!isDragendeanli) {
				setTimeout(animateEndfunction, aniTimer);
				return;
			};
			isDragendeanli = false;
			var thstates = new Date().getTime();
			var chazhis = thstates - starTime;
			if (chazhis < 300) {
				if (panstPotinX < 40 && panstPotinX > 0) {
					obj2li.eq(curptins).stop().animate({
						left: 100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 10);
					obj2li.eq(getPrveInt()).stop().animate({
						left: 0 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
					if (liliength > 2) {
						obj2li.eq(getNextInt()).stop().animate({
							left: -100 + "%"
						}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
					};
					curptins--
				};
				if (panstPotinX > -40 && panstPotinX < 0) {
					obj2li.eq(curptins).stop().animate({
						left: -100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 10);
					obj2li.eq(getNextInt()).stop().animate({
						left: 0 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
					if (liliength > 2) {
						obj2li.eq(getPrveInt()).stop().animate({
							left: 100 + "%"
						}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
					};
					curptins++
				}
			} else {
				obj2li.eq(curptins).stop().animate({
					left: 0 + "%"
				}, aniTimer, easingstr, animateEndfunction).css("z-index", 10);
				if (panstPotinX > 0) {
					obj2li.eq(getPrveInt()).stop().animate({
						left: -100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
					if (liliength > 2) {
						obj2li.eq(getNextInt()).stop().animate({
							left: 100 + "%"
						}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
					}
				} else {
					obj2li.eq(getNextInt()).stop().animate({
						left: 100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
					if (liliength > 2) {
						obj2li.eq(getPrveInt()).stop().animate({
							left: -100 + "%"
						}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
					}
				};
			}
			if (panstPotinX > 40) {
				obj2li.eq(curptins).stop().animate({
					left: 100 + "%"
				}, aniTimer, easingstr, animateEndfunction).css("z-index", 10);
				obj2li.eq(getPrveInt()).stop().animate({
					left: 0 + "%"
				}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
				if (liliength > 2) {
					obj2li.eq(getNextInt()).stop().animate({
						left: -100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
				};
				curptins--
			};
			if (panstPotinX < -40) {
				obj2li.eq(curptins).stop().animate({
					left: -100 + "%"
				}, aniTimer, easingstr, animateEndfunction).css("z-index", 10);
				obj2li.eq(getNextInt()).stop().animate({
					left: 0 + "%"
				}, aniTimer, easingstr, animateEndfunction).css("z-index", 5);
				if (liliength > 2) {
					obj2li.eq(getPrveInt()).stop().animate({
						left: 100 + "%"
					}, aniTimer, easingstr, animateEndfunction).css("z-index", 0)
				};
				curptins++
			};
			setcurptinszhi();
			panstPotinX = 0
		});

		function setcurptinszhi() {
			if (curptins < 0) {
				curptins = liliength - 1
			};
			if (curptins > liliength - 1) {
				curptins = 0
			};
			numdian.removeClass(css).eq(curptins).addClass(css);
			obj2li.removeClass(css).eq(curptins).addClass(css)
		};
		this.event.move(domObj, function(ev) {
			if (Math.abs(ev.deltaY) > Math.abs(ev.deltaX) * 5) {
				return;
			} else {
				ev.preventDefault()
			};
			if (!isDragendeanli) return;
			clearInterval(setIntervalsAAA);
			setIntervalsAAA = setInterval(functionTimegd, time);
			var deltaXz = ev.deltaX;
			var baifenbuzh = deltaXz / ulweidth * 100;
			panstPotinX = baifenbuzh;
			obj2li.eq(curptins).stop().css({
				left: baifenbuzh + "%"
			});
			if (deltaXz > 0) {
				obj2li.eq(getPrveInt()).stop().css({
					left: baifenbuzh - 100 + "%"
				});
				if (liliength > 2) {
					obj2li.eq(getNextInt()).stop().css({
						left: baifenbuzh + 100 + "%"
					})
				}
			} else {
				obj2li.eq(getNextInt()).stop().css({
					left: baifenbuzh + 100 + "%"
				});
				if (liliength > 2) {
					obj2li.eq(getPrveInt()).stop().css({
						left: baifenbuzh - 100 + "%"
					})
				}
			};
		});

		function getPrveInt() {
			var PrveInt = curptins - 1;
			if (PrveInt < 0) {
				PrveInt = liliength - 1
			};
			return PrveInt
		};

		function getNextInt() {
			var NextInt = curptins + 1;
			if (NextInt > liliength - 1) {
				NextInt = 0
			};
			return NextInt
		};
		setIntervalsAAA = setInterval(functionTimegd, time);

		function functionTimegd() {
			if (curptins + 1 > liliength - 1) {
				animatgundxz(0, true)
			} else {
				animatgundxz(curptins + 1, true)
			}
		};

		function animatgundxz(cuet, drect) {
			clearInterval(setIntervalsAAA);
			setIntervalsAAA = setInterval(functionTimegd, time);
			obj2li.stop().css({
				left: "100%"
			});
			if (drect) {
				obj2li.eq(cuet).stop().css({
					left: "100%"
				});
				obj2li.eq(cuet).animate({
					left: 0
				}, aniTimer, easingstr, animateEndfunction);
				obj2li.eq(curptins).stop().css({
					left: "0%"
				});
				obj2li.eq(curptins).animate({
					left: "-100%"
				}, aniTimer, easingstr, animateEndfunction)
			} else {
				obj2li.eq(cuet).css({
					left: "-100%"
				}).animate({
					left: 0
				}, aniTimer, easingstr, animateEndfunction);
				obj2li.eq(curptins).css({
					left: "0%"
				}).animate({
					left: "100%"
				}, aniTimer, easingstr, animateEndfunction)
			};
			curptins = cuet;
			numdian.removeClass(css).eq(curptins).addClass(css);
			obj2li.removeClass(css).eq(curptins).addClass(css)
		};
		$(window).resize(function() {
			obj2li.stop().css({
				left: "100%"
			});
			obj2li.eq(curptins).stop().css({
				left: 0
			});
			ulweidth = obj1ul.width()
		})
	},
	marqueeEffect: function(ul, li, time, Unit, hoverStop, tp, liwid) {
		var ulobj = $(ul);
		var liobj = $(li);
		time = time || 30;
		Unit = Unit || 1;
		hoverStop = hoverStop || true;
		var Ulhtml = ulobj.html();
		ulobj.html(Ulhtml + Ulhtml);
		var length = liobj.length;
		console.log(length)
		var widZ = liwid * length * 2
		ulobj.width(widZ);
		var curXzhi = 0;
		liobj = $(li);
		if (liobj.length < 1) {
			return
		};
		var setInterVaaa = null
		if (tp == 1) {
			clearInterval(setInterVaaa)
			setInterVaaa = setInterval(setInterVaaa_hs, time);
		} else {
			clearInterval(setInterVaaa)
			setInterVaaa = setInterval(setInterVaaa_hs2, time);
		}

		function setInterVaaa_hs() {
			var cdW = liobj.eq(length).position().left;
			curXzhi -= Unit;
			if (curXzhi < -cdW) {
				curXzhi = -(-cdW - curXzhi)
			};
			ulobj.css("left", curXzhi)
		};

		function setInterVaaa_hs2() {
			var cdW = liobj.eq(length).position().right;
			curXzhi -= Unit;
			if (curXzhi < -cdW) {
				curXzhi = -(-cdW - curXzhi)
			};
			ulobj.css("right", curXzhi)
			if (Math.abs(curXzhi) > widZ - $(window).width()) {
				ulobj.css("right", 0)
				curXzhi = 0
			}
		};
		if (!hoverStop) {
			return
		};
		ulobj.hover(function() {
			clearInterval(setInterVaaa)
		}, function() {
			if (tp == 1) {
				clearInterval(setInterVaaa)
				setInterVaaa = setInterval(setInterVaaa_hs, time);
			} else {
				clearInterval(setInterVaaa)
				setInterVaaa = setInterval(setInterVaaa_hs2, time);
			}
		})
	},
	hBannerLoop: function(obj1, obj, num, num2, btnl, btnr, css, timer, yuzhi, aniTimer, ismousehover, easingstr) {
		aniTimer = aniTimer || 300;
		easingstr = easingstr || "linear";
		num = num || "";
		num2 = num2 || "";
		btnl = btnl || "";
		btnr = btnr || "";
		css = css || "current";
		timer = timer || 5e3;
		yuzhi = yuzhi || 0;
		ismousehover = ismousehover || false;
		var objObj = $(obj);
		var obj1Obj = $(obj1);
		var numObj = $(num);
		var numObj2 = $(num2);
		var objL = objObj.length;
		var objW = objObj.width() + yuzhi;
		var objHtml = obj1Obj.html();
		var dq_ind = objL;
		var settimesdw;
		var isAnime = true;
		obj1Obj.html(objHtml + objHtml + objHtml);
		obj1Obj.width(objL * objW * 3);
		obj1Obj.css("left", dq_ind * objW * -1);
		objObj = $(obj);
		numObj.eq(0).addClass(css);
		numObj2.eq(0).addClass(css);
		objObj.removeClass(css);
		objObj.eq(0).addClass(css);
		objObj.eq(0 + objL).addClass(css);
		objObj.eq(0 + objL * 2).addClass(css);
		//settimesdw = setInterval(settimesdw_hs, timer);

		function settimesdw_hs() {
			if (dq_ind > objL * 2 - 1) {
				dq_ind = objL;
				obj1Obj.css("left", objL * objW * -1)
			};
			dq_ind++;
			tweener(dq_ind)
		};

		function tweener(int) {
			isAnime = false;
			obj1Obj.stop().animate({
				left: int * objW * -1
			}, aniTimer, easingstr, function() {
				isAnime = true
			});
			numObj.removeClass(css);
			numObj.eq(int % objL).addClass(css);
			numObj2.removeClass(css);
			numObj2.eq(int % objL).addClass(css);
			objObj.removeClass(css);
			objObj.eq(int % objL).addClass(css);
			objObj.eq(int % objL + objL).addClass(css);
			objObj.eq(int % objL + objL * 2).addClass(css)
		};
		$(btnl).click(function() {
			if (!isAnime) return;
			//clearInterval(settimesdw);
			//settimesdw = setInterval(settimesdw_hs, timer);
			if (dq_ind < objL) {
				dq_ind = objL * 2 - 1;
				obj1Obj.css("left", dq_ind * objW * -1)
			};
			dq_ind--;
			tweener(dq_ind)
		});
		$(btnr).click(function() {
			if (!isAnime) return;
			//clearInterval(settimesdw);
			//settimesdw = setInterval(settimesdw_hs, timer);
			if (dq_ind > objL * 2 - 1) {
				dq_ind = objL;
				obj1Obj.css("left", objL * objW * -1)
			};
			dq_ind++;
			tweener(dq_ind)
		});
		if (ismousehover) {
			obj1Obj.hover(function() {
				//clearInterval(settimesdw)
			}, function() {
				//settimesdw = setInterval(settimesdw_hs, timer)
			})
		};
		numObj.click(function() {
				if (!isAnime) return;
				//clearInterval(settimesdw);
				//settimesdw = setInterval(settimesdw_hs, timer);
				dq_ind = numObj.index(this);
				tweener(dq_ind)
			}),
			numObj2.click(function() {
				if (!isAnime) return;
				//clearInterval(settimesdw);
				//settimesdw = setInterval(settimesdw_hs, timer);
				dq_ind = numObj2.index(this);
				tweener(dq_ind)
			})
	},
	fadeBanner: function(obj, num, btnl, btnr, css, timer, aniTimer, ismouseover, easingstr) {
		num = num || "";
		btnl = btnl || "";
		btnr = btnr || "";
		css = css || "current";
		timer = timer || 5e3;
		aniTimer = aniTimer || 300;
		ismouseover = ismouseover || false;
		easingstr = easingstr || "linear";
		var objlObj = $(obj);
		var numObj = $(num);
		var objl = objlObj.length;
		var dq_ind = 0;
		var setshijinasdw;
		for (var i = 0; i < objl; i++) {
			objlObj.eq(i).css("z-index", 50 - i)
		};
		numObj.eq(0).addClass(css);
		objlObj.removeClass(css).eq(0).addClass(css);

		function fadesetInrt(int) {
			for (var i = 0; i < objl; i++) {
				objlObj.eq(i).css("z-index", objlObj.eq(i).css("z-index") - 1)
			};
			objlObj.eq(int).stop().css({
				zIndex: 100,
				opacity: 0
			});
			objlObj.eq(int).stop().animate({
				opacity: 1
			}, aniTimer, easingstr);
			numObj.removeClass(css);
			numObj.removeClass(css + '-pre');
			numObj.eq(int).addClass(css);
			if (int > 0) {
				numObj.eq(int - 1).addClass(css + '-pre');
			}
			objlObj.removeClass(css).eq(int).addClass(css)
		};
		setshijinasdw = setInterval(setshijinasdw_hs, timer);

		function setshijinasdw_hs() {
			dq_ind++;
			if (dq_ind > objl - 1) {
				dq_ind = 0
			};
			fadesetInrt(dq_ind)
		};
		$(btnl).click(function() {
			clearInterval(setshijinasdw);
			setshijinasdw = setInterval(setshijinasdw_hs, timer);
			dq_ind--;
			if (dq_ind < 0) {
				dq_ind = objl - 1
			};
			fadesetInrt(dq_ind)
		});
		$(btnr).click(function() {
			clearInterval(setshijinasdw);
			setshijinasdw = setInterval(setshijinasdw_hs, timer);
			dq_ind++;
			if (dq_ind > objl - 1) {
				dq_ind = 0
			};
			fadesetInrt(dq_ind)
		});
		if (ismouseover) {
			objlObj.hover(function() {
				clearInterval(setshijinasdw)
			}, function() {
				setshijinasdw = setInterval(setshijinasdw_hs, timer)
			})
		};
		numObj.hover(function() {
			clearInterval(setshijinasdw);
			setshijinasdw = setInterval(setshijinasdw_hs, timer);
			dq_ind = numObj.index(this);
			fadesetInrt(dq_ind)
		})
	},
	footFixedInput: function(elAry, ipt, isloop, foucTime) {
		elAry = elAry || [];
		if (elAry.length < 1) return;
		var foter = [];
		var marTop = [];
		for (var i = 0; i < elAry.length; i++) {
			foter.push($(elAry[i].el));
			marTop.push(elAry[i].tp)
		};
		var foterInput = $(ipt);
		var isSetfirst = isloop || false;
		if (foucTime != 0) {
			foucTime = foucTime || 10;
		};
		var yuancH = $(window).scrollTop();
		var $window = $(window);
		var $document = $(document);
		var htmlbody = $("html,body");
		var focuTop = 0;
		var keybordH = 0;
		var isfocs = false;
		var fochStyle = new Array(foter.length);
		var windoHt = 0;
		var docuHt = 0;
		var isloadsize = false;
		var isfirst = true;

		function gethET_() {
			windoHt = $window.height();
			docuHt = $document.height();
			focuTop = $window.scrollTop()
		};

		function _setOpacity_() {
			for (var i = 0; i < foter.length; i++) {
				foter[i].css("opacity", 0)
			}
		};

		function firstCall() {
			var sctopmax1 = docuHt - windoHt;
			_setOpacity_();
			setTimeout(function() {
				var sctopy = $window.scrollTop();
				htmlbody.scrollTop(999999999);
				var sctopmax2 = $window.scrollTop();
				htmlbody.scrollTop(sctopy);
				keybordH = sctopmax2 - sctopmax1;
				for (var i = 0; i < foter.length; i++) {
					foter[i].css({
						"top": $window.scrollTop() + (windoHt - keybordH),
						"position": "absolute",
						"margin-top": marTop[i],
						opacity: 1
					})
				}
			}, foucTime)
		};

		function getfotattr() {
			for (var i = 0; i < fochStyle.length; i++) {
				fochStyle[i] = foter[i].attr("style")
			}
		};
		foterInput.focusin(function() {
			isfocs = true;
			getfotattr();
			gethET_();
			if (isfirst || isloadsize) {
				firstCall();
				isfirst = false;
				isloadsize = false;
				if (isSetfirst) {
					isfirst = true;
				}
			} else {
				_setOpacity_();
				setTimeout(function() {
					for (var i = 0; i < foter.length; i++) {
						foter[i].css({
							"top": $window.scrollTop() + (windoHt - keybordH),
							"position": "absolute",
							"margin-top": marTop[i],
							opacity: 1
						})
					}
				}, foucTime)
			}
		});
		foterInput.focusout(function() {
			isfocs = false;
			htmlbody.scrollTop(focuTop);
			for (var i = 0; i < fochStyle.length; i++) {
				if (fochStyle[i]) {
					foter[i].attr("style", fochStyle[i])
				} else {
					foter[i].removeAttr("style")
				}
			};
		});
		if (document["addEventListener"]) {
			document.addEventListener("touchmove", function(e) {
				if (isfocs) {
					e.preventDefault()
				}
			})
		};
		$window.resize(function() {
			if (isfocs) {
				gethET_();
				firstCall()
			};
			isloadsize = true;
		})
	}

};
